import {Pipe, PipeTransform} from '@angular/core';

@Pipe({
  name: 'genderrr'
})
export class GenderPipe implements PipeTransform {
  transform(value: any, ...args: any[]): any {
    if (value === 'M' || value === 1) {
      return '男';
    } else if (value === 'U' || value === 0) {
      return '保密';
    } else if (value === 'F' || value === 2) {
      return '女';
    } else if (value === null || value === undefined || value === '') {
      return '未显示';
    } else {
      return value;
    }
  }
}
